<?php
require_once 'config.php';
require_once 'class/Mysql.class.php';

$db = new Mysql();

foreach( $table as $v ){
	if( file_exists('bbb/table_'.$v.'.txt') ){
		$c = file_get_contents('bbb/table_'.$v.'.txt');
		$c = mysql_real_escape_string( $c );
		$sql = "update Template set Style = '{$c}' where TID={$v}";
		$db->query( $sql );
	}
}

echo 444;